package aliyun.cx.admin.dto;

import java.time.LocalDateTime;

/**
 * 评论数据传输对象
 */
public class CommentDTO {
    
    private Long id;
    private String content;
    private Long userId;
    private Long articleId;
    private Long parentId;
    private LocalDateTime createTime;
    
    // 扩展字段
    private String userName;        // 用户名
    private String articleTitle;    // 文章标题
    private Integer childCount;     // 子评论数量
    
    // 构造函数
    public CommentDTO() {}
    
    public CommentDTO(Long id, String content, Long userId, Long articleId, Long parentId, LocalDateTime createTime) {
        this.id = id;
        this.content = content;
        this.userId = userId;
        this.articleId = articleId;
        this.parentId = parentId;
        this.createTime = createTime;
    }
    
    // Getters and Setters
    public Long getId() {
        return id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
    public String getContent() {
        return content;
    }
    
    public void setContent(String content) {
        this.content = content;
    }
    
    public Long getUserId() {
        return userId;
    }
    
    public void setUserId(Long userId) {
        this.userId = userId;
    }
    
    public Long getArticleId() {
        return articleId;
    }
    
    public void setArticleId(Long articleId) {
        this.articleId = articleId;
    }
    
    public Long getParentId() {
        return parentId;
    }
    
    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }
    
    public LocalDateTime getCreateTime() {
        return createTime;
    }
    
    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
    
    public String getUserName() {
        return userName;
    }
    
    public void setUserName(String userName) {
        this.userName = userName;
    }
    
    public String getArticleTitle() {
        return articleTitle;
    }
    
    public void setArticleTitle(String articleTitle) {
        this.articleTitle = articleTitle;
    }
    
    public Integer getChildCount() {
        return childCount;
    }
    
    public void setChildCount(Integer childCount) {
        this.childCount = childCount;
    }
    
    @Override
    public String toString() {
        return "CommentDTO{" +
                "id=" + id +
                ", content='" + content + '\'' +
                ", userId=" + userId +
                ", articleId=" + articleId +
                ", parentId=" + parentId +
                ", createTime=" + createTime +
                ", userName='" + userName + '\'' +
                ", articleTitle='" + articleTitle + '\'' +
                ", childCount=" + childCount +
                '}';
    }
}
